import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';

class YBFindSubFPage extends StatelessWidget {
  final String imageStr;
  final String titleStr;
  final String subImageStr;

  const YBFindSubFPage({Key key, this.imageStr, this.titleStr, this.subImageStr}) : super(key: key);

  @override
  Widget build(BuildContext context) {

    // Widget subImageWidget;
    //
    // if (subImageStr.isNotEmpty) {
    //     subImageWidget = Image.network("https://avatars2.githubusercontent.com/u/20411648?s=460&v=4",width: 40,height: 40,);
    // }else{
    //     subImageWidget = Text("");
    // }

    return Container(
        height: YBTextStyle.adapterSize58,
        child: Column(
          children: [
            Expanded(
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: [
                  Container(
                    width: YBTextStyle.adapterSize16,
                  ),
                  Container(
                    child: Image.asset(YBImageStyle.getImagePath(imageStr),height: YBTextStyle.adapterSize24,width: YBTextStyle.adapterSize24,),
                  ),
                  Container(
                    width: YBTextStyle.adapterSize10,
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    child: Text(titleStr,style: YBTextStyle.findFaXiantText,),
                  ),
                  Spacer(),
                  Container(
                    alignment: Alignment.centerRight,
                    child: Image.asset(YBImageStyle.getImagePath('findIconArrowRight'),width:YBTextStyle.adapterSize6,height: YBTextStyle.adapterSize10,),
                  ),
                  Container(
                    width: YBTextStyle.adapterSize12,
                  ),
                  // Container(
                  //   child: subImageWidget,
                  // ),
                ],
              ),
            ),
            Container(
              child: Padding(
                  padding: EdgeInsets.only(left: YBTextStyle.adapterSize16,),
                  child: Container(
                     height: 1,
                     color: YBColor.commonBackGroundColor,
                  ),
              ),
            ),
          ],
        ),
    );
  }
}
